<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:gui="clr-namespace:DentalGUIHelper;assembly=DentalConfig">
	
    <!-- Stlye for all ScrollViewers free to use -->


<Style x:Key="NamedScrollViewer" TargetType="{x:Type ScrollViewer}">
  <Setter Property="OverridesDefaultStyle" Value="True" />
  <Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type ScrollViewer}">
        	<Grid x:Name="Grid" Background="{TemplateBinding Background}">
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="*"/>
        			<ColumnDefinition Width="Auto"/>
        		</Grid.ColumnDefinitions>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="*"/>
        			<RowDefinition Height="Auto"/>
        		</Grid.RowDefinitions>
        		<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
        		<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
					CanContentScroll="{TemplateBinding CanContentScroll}"
					CanHorizontallyScroll="False"
					CanVerticallyScroll="False"
					ContentTemplate="{TemplateBinding ContentTemplate}"
					Content="{TemplateBinding Content}" 
					Grid.Column="0" 
					Margin="{TemplateBinding Padding}" 
					Grid.Row="0"/>
        		<ScrollBar x:Name="PART_VerticalScrollBar"
					Width="{TemplateBinding gui:Width.TrackWidth}" 
					AutomationProperties.AutomationId="VerticalScrollBar"
					Cursor="Arrow"
					Grid.Column="1" 
					Maximum="{TemplateBinding ScrollableHeight}"
					Minimum="0"
					Grid.Row="0" 
					Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" 
					Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" 
					ViewportSize="{TemplateBinding ViewportHeight}"/>
        		<ScrollBar x:Name="PART_HorizontalScrollBar"
					Height="{TemplateBinding gui:Height.TrackHeight}" 
					AutomationProperties.AutomationId="HorizontalScrollBar" 
					Cursor="Arrow" 
					Grid.Column="0"
					Maximum="{TemplateBinding ScrollableWidth}" 
					Minimum="0"
					Orientation="Horizontal"
					Grid.Row="1"
					Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
					Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
					ViewportSize="{TemplateBinding ViewportWidth}"/>
        	</Grid>
			<ControlTemplate.Triggers>                        
				<Trigger Property="IsMouseOver" Value="True" SourceName="PART_VerticalScrollBar">
					<Setter Property="Opacity" Value="1.0" TargetName="PART_VerticalScrollBar"/>
				</Trigger>
				<Trigger Property="IsMouseOver" Value="False" SourceName="PART_VerticalScrollBar">
					<Setter Property="Opacity" Value="0.2" TargetName="PART_VerticalScrollBar"/>
				</Trigger>
				<Trigger Property="IsMouseOver" Value="True" SourceName="PART_HorizontalScrollBar">
					<Setter Property="Opacity" Value="1.0" TargetName="PART_HorizontalScrollBar"/>
				</Trigger>
				<Trigger Property="IsMouseOver" Value="False" SourceName="PART_HorizontalScrollBar">
					<Setter Property="Opacity" Value="0.2" TargetName="PART_HorizontalScrollBar"/>
				</Trigger>
			</ControlTemplate.Triggers>
        </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>
	
</ResourceDictionary>